package com.zb.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zb.entity.ZjWorkLeaveMessage03;
import com.zb.mapper.ZjWorkLeaveMessage03Mapper;
import com.zb.service.ZjWorkLeaveMessage03Service;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * <p>
 * 工单留言表 服务实现类
 * </p>
 *
 * @author WEN
 * @since 2023-10-24
 */
@Service
public class ZjWorkLeaveMessage03ServiceImpl extends ServiceImpl<ZjWorkLeaveMessage03Mapper, ZjWorkLeaveMessage03> implements ZjWorkLeaveMessage03Service {
    @Resource
    private ZjWorkLeaveMessage03Mapper workLeaveMessage03Mapper;

    // 根据工单ID更新工单客服未读留言
    @Override
    public void updateWorkEmpNotReadLeaveMessageByWorkId(Long workId) {
        workLeaveMessage03Mapper.updateWorkEmpNotReadLeaveMessageByWorkId(workId);
    }

    // 根据工单ID更新服务商未读留言
    @Override
    public void updateNetworkNotReadLeaveMessageByWorkId(Long workId, boolean engineer) {
        workLeaveMessage03Mapper.updateNetworkNotReadLeaveMessageByWorkId(workId, engineer);
    }

    // 根据工单ID更新工程师未读留言
    @Override
    public void updateEngineerNotReadLeaveMessageByWorkId(Long workId) {
        workLeaveMessage03Mapper.updateEngineerNotReadLeaveMessageByWorkId(workId);
    }

    // 根据工单ID更新工单客户未读留言
    @Override
    public void updateUserNotReadLeaveMessageByWorkId(Long workId) {
        workLeaveMessage03Mapper.updateUserNotReadLeaveMessageByWorkId(workId);
    }
}
